package com.starbaba.base.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.base.common.exception.AppException;
import com.base.common.log.LogService;
import com.starbaba.base.dao.LoanManagerBaseDao;
import com.starbaba.base.service.CommProductPrdidService;
import com.tuanzi.server.loan_base.model.db.CommProductPrdid;

public class CommProductPrdidServiceImpl extends LoanManagerBaseDao implements CommProductPrdidService{

	@Override
	public Map<String, String> getCommProductPrdidMap() {
		
		Map<String, String> map = new HashMap<String, String>();
		
		try {
			String sql = "SELECT * FROM `comm_product_prdid`";
			List<CommProductPrdid> list = getDao().list(sql, CommProductPrdid.class);
			if(list != null && list.size() > 0){
				
				for(CommProductPrdid prdid: list){
					map.put(String.valueOf(prdid.getPrdid()), prdid.getName());
				}
			}
			return map;
		} catch (AppException e) {
			LogService.error(e);
		}
		
		return map;
		
	}


}
